Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix: Remove expected error message #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
iluuu1994 merged 1 commit into phpstan:master from localheinz:fix/build
Dec 5, 2018

Conversation

@localheinz
Copy link
Contributor

@localheinz localheinz commented Dec 5, 2018

This PR

  • fixes the build by removing an expected error message

Follows 1ed86a5.

πŸ’β€β™‚οΈ Not sure if instead the CallToDeprecatedStaticMethodRule should be fixed. What do you think?

13,
],
[
'Call to deprecated method deprecatedFoo() of class CheckDeprecatedStaticMethodCall\Foo.',
Copy link
Contributor Author

@localheinz localheinz Dec 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of

if (DeprecatedScopeHelper::isScopeDeprecated($scope)) {
return [];
}

and

/**
* @deprecated
*/
public static function deprecatedFoo()
{
}

and

public static function deprecatedFoo()
{
parent::foo();
parent::deprecatedFoo();
}

we never enter the scope of the deprecated method Bar::deprecatedFoo().

@iluuu1994 iluuu1994 merged commit cc60143 into phpstan:master Dec 5, 2018
Copy link
Collaborator

Ah, I didn't realize deprecatedFoo() was overwritten. Since 0.11 phpDoc annotations are implicitly inherited. Since the method itself is now deprecated the error message goes away. I think this is ok.

@ondrejmirtes Do you agree?

Copy link
Collaborator

Thanks πŸ™‚

@localheinz localheinz deleted the fix/build branch December 5, 2018 17:14
Copy link
Contributor Author

Thank you, @iluuu1994!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /